#ifndef MDTX_USE_RCPPARMADILLO
#define MDTX_USE_RCPPARMADILLO
#endif

#include <RcppArmadillo.h>
using namespace Rcpp;

#include "mdtx-online/indicator/indicator_type_ma.h"
#include "mdtx-online/indicator/indicator_type_ma_osc.h"
using namespace mdtx::online;

#include "indi_common.h"

using smosc_ = indi1<indicator::smosc>;

//' Moving average oscillator
//'
//' @param x Numeric vector to calculate smosc
//' @param fast_period Fast period
//' @param slow_period Slow period
//' @return Numeric vector
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector smosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = smosc_::create_t(fast_period, slow_period);
    return smosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP smosc_new(int fast_period, int slow_period)
{
    return smosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector smosc_run(SEXP ptr, NumericVector x)
{
    return smosc_::run(ptr, x);
}

using tmosc_ = indi1<indicator::maosc<indicator::tma>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector tmosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = tmosc_::create_t(fast_period, slow_period);
    return tmosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP tmosc_new(int fast_period, int slow_period)
{
    return tmosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector tmosc_run(SEXP ptr, NumericVector x)
{
    return tmosc_::run(ptr, x);
}

using wmosc_ = indi1<indicator::maosc<indicator::wma>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector wmosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = wmosc_::create_t(fast_period, slow_period);
    return wmosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP wmosc_new(int fast_period, int slow_period)
{
    return wmosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector wmosc_run(SEXP ptr, NumericVector x)
{
    return wmosc_::run(ptr, x);
}

using hmosc_ = indi1<indicator::maosc<indicator::hma>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector hmosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = hmosc_::create_t(fast_period, slow_period);
    return hmosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP hmosc_new(int fast_period, int slow_period)
{
    return hmosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector hmosc_run(SEXP ptr, NumericVector x)
{
    return hmosc_::run(ptr, x);
}

using emosc_ = indi1<indicator::emosc>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector emosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = emosc_::create_t(fast_period, slow_period);
    return emosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP emosc_new(int fast_period, int slow_period)
{
    return emosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector emosc_run(SEXP ptr, NumericVector x)
{
    return emosc_::run(ptr, x);
}

using demosc_ = indi1<indicator::maosc<indicator::dema>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector demosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = demosc_::create_t(fast_period, slow_period);
    return demosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP demosc_new(int fast_period, int slow_period)
{
    return demosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector demosc_run(SEXP ptr, NumericVector x)
{
    return demosc_::run(ptr, x);
}

using temosc_ = indi1<indicator::maosc<indicator::tema>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector temosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = temosc_::create_t(fast_period, slow_period);
    return temosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP temosc_new(int fast_period, int slow_period)
{
    return temosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector temosc_run(SEXP ptr, NumericVector x)
{
    return temosc_::run(ptr, x);
}

using t3mosc_ = indi1<indicator::maosc<indicator::t3ma>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector t3mosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = t3mosc_::create_t(fast_period, slow_period);
    return t3mosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP t3mosc_new(int fast_period, int slow_period)
{
    return t3mosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector t3mosc_run(SEXP ptr, NumericVector x)
{
    return t3mosc_::run(ptr, x);
}

using ewmosc_ = indi1<indicator::maosc<indicator::ewma>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector ewmosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = ewmosc_::create_t(fast_period, slow_period);
    return ewmosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP ewmosc_new(int fast_period, int slow_period)
{
    return ewmosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector ewmosc_run(SEXP ptr, NumericVector x)
{
    return ewmosc_::run(ptr, x);
}

using zlemosc_ = indi1<indicator::maosc<indicator::zlema>>;

//' @rdname smosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector zlemosc(NumericVector x, int fast_period, int slow_period)
{
    auto c = zlemosc_::create_t(fast_period, slow_period);
    return zlemosc_::run_t(c, x);
}

// [[Rcpp::export(rng = false)]]
SEXP zlemosc_new(int fast_period, int slow_period)
{
    return zlemosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector zlemosc_run(SEXP ptr, NumericVector x)
{
    return zlemosc_::run(ptr, x);
}

using vwmosc_ = indi1<indicator::wmaosc<indicator::vwma>>;

//' Volume weighted MA oscillator
//'
//' @param price Numeric vector price
//' @param volume Numeric vector volume
//' @param fast_period fast moving window period
//' @param slow_period slow moving window period
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector vwmosc(NumericVector price, NumericVector volume, int fast_period, int slow_period)
{
    auto c = vwmosc_::create_t(fast_period, slow_period);
    return vwmosc_::run_t(c, price, volume);
}

// [[Rcpp::export(rng = false)]]
SEXP vwmosc_new(int fast_period, int slow_period)
{
    return vwmosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector vwmosc_run(SEXP ptr, NumericVector price, NumericVector volume)
{
    return vwmosc_::run(ptr, price, volume);
}

using evwmosc_ = indi1<indicator::wmaosc<indicator::evwma>>;

//' @rdname vwmosc
//' @export
// [[Rcpp::export(rng = false)]]
NumericVector evwmosc(NumericVector price, NumericVector volume, int fast_period, int slow_period)
{
    auto c = evwmosc_::create_t(fast_period, slow_period);
    return evwmosc_::run_t(c, price, volume);
}

// [[Rcpp::export(rng = false)]]
SEXP evwmosc_new(int fast_period, int slow_period)
{
    return evwmosc_::create(fast_period, slow_period);
}

// [[Rcpp::export(rng = false)]]
NumericVector evwmosc_run(SEXP ptr, NumericVector price, NumericVector volume)
{
    return evwmosc_::run(ptr, price, volume);
}
